Script: if objValue="Open" then┬ wsSet wdID,"bar","Max", "100"┬ findNextStock 0┬ get wsGet(wdID,"multiplier:","Hilite")┬ if it=true then┬ wsSet wdID,"mult","Disabled","false"┬ wsSet wdID,"change","Disabled", "false"┬ else┬ wsSet wdID,"mult","Disabled","true"┬ wsSet wdID,"change","Disabled", "true"┬ end if┬end if
Params: i0_TopLeft┬i11_Text┬i10_Hilite
Result: i6_Text┬i11_Text┬i10_Hilite
ItemType: PUSH
Rect: 232,88,304,108
AutoSize: FALSE
Name: Enter
DefaultItem: TRUE
Script: get wsGet(wdID,"newprice","text")┬put it into xxx┬if (xxx=empty) or (xxx=0) then┬ alertNote("Enter a price, cancel or skip.")┬else┬ global namePrice,nameLine,realLine┬ get wsGet(wdID,"multiplier:","Hilite")┬ if it=true then┬ get wsGet(wdID,"mult","Text")┬ put it into mult┬ if mult is empty or mult is not a number then┬ put 1 into mult┬ end if┬ else┬ put 1 into mult┬ end if┬ put makeDecimal((stripit(xxx))/mult) into line realLine of fld "price"┬ get wsGet(wdID,"Stock","Text")┬ put return&it after namePrice┬ findNextStock nameLine┬end if┬
ItemType: PUSH
Rect: 120,88,200,108
Name: cancel
CancelItem: TRUE
AutoClose: TRUE
ItemType: PUSH
Rect: 10,88,90,108
Name: skip
Script: global nameLine┬findNextStock nameLine
ItemType: TEXT
Rect: 8,8,288,26
TextSize: 12
AutoSize: FALSE
Name: Stock
Text: C-Cube
ItemType: TEXT
Rect: 10,124,310,156
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Name: instr
Text: Enter the price either as decimals or with a space between the whole number and fraction {e.g., 67.125 or 67 1/8}.
Text: Checking ╥multiplier╙ will show the price multiplied by a factor so that you can easily compare it with your new entry. The default multiplier that appears here is set in the Preferences section. Enter a multiplier besides 1.00 (click ╥change╙) if you want the price displayed to be a multiple of the ╥standard╙ price (e.g., if you enter cents rather than dollars, set the multiplier to be 100 to convert from standard ╥dollar╙ format). The price will be converted back to ╥standard╙ format for storage in the stack.
ItemType: CHK
Rect: 171,34,250,47
TextFont: Geneva
TextSize: 10
Name: multiplier:
Script: get wsGet(wdID,"mult","Text")┬put it into mm┬get wsGet(wdID,"newprice","Text")┬put it into thePrice┬if thePrice¡empty then┬ get wsGet(wdID,"multiplier:","Hilite")┬ put it into hh┬ set numberFormat to "0.000"┬ if hh=true then┬ wsSet wdID,"newprice","Text",thePrice*mm┬ wsSet wdID,"mult","Disabled","FALSE"┬ wsSet wdID,"change","Disabled","FALSE"┬ else┬ wsSet wdID,"newprice","Text",thePrice/mm┬ wsSet wdID,"mult","Disabled", "true"┬ wsSet wdID,"change","Disabled", "true"┬ end if┬ wsSet wdID,"newprice","Selection", "0,10"┬end if
ItemType: TEXT
Rect: 250,34,305,47
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Disabled: TRUE
Name: mult
Text: 1.00
ItemType: PUSH
Rect: 248,51,284,67
TextFont: Geneva
TextSize: 9
AutoSize: FALSE
Disabled: TRUE
Name: change
Script: get wsGet(wdID,"mult","Text")┬put it into oldM┬if oldM=empty or oldM=0 then put "1.00" into oldM┬put windowScript("New multiplier",wstl(200,200),oldM) into rr┬if line 1 of rr="OK" then┬ put line 2 of rr into mm┬ set the numberFormat to "0"┬ if mm<1000 then set the numberFormat to "0.00"┬ if mm<1 then set the numberFormat to "0.0000"┬ add 0 to mm┬ put "Easy-enter" into wdID --Ñ┬ wsSet wdID,"mult","Text",mm┬ get wsGet(wdID,"newPrice","Text")┬ put it into thePrice┬ if thePrice¡empty then┬ set numberFormat to "0.000"┬ wsSet wdID,"newprice","Text",(thePrice*mm/oldM)┬ wsSet wdID,"newprice","Selection","0,10"┬ end if┬end if